<?php
$s="123abc汉";
echo $s,"\n";
echo $s[0],$s[3],$s[6],"\n"; //字符串就是一个数组
echo 'I\'m a teacher\\student\n',"\n"; //单引号字符串中转义字符就两个：\'  \\
echo "He say:\"I'm a student\"\n"; //双引号字符串识别更多的转义字符
$a=123;
$b=6789;
echo "$a + $b = ", $a+$b,"\n"; //双引号字符串可解析变量的值
//echo "$a + $b = ${a+b}","\n"; //不支持该写法 ${a+b}

$go="去";
$goo="咕咕叫的声音";
$good="好的";
$goods="商品";
echo "{$good}s是什么意思？{$goo}ds\n";
$a=['2401','name'=>'张三','age'=>18];
echo "学号：$a[0]，姓名：$a[name]，年龄：$a[age]\n";
echo "学号：{$a[0]}，姓名：{$a['name']}，年龄：${a['age']}\n";
$a=[['2401','name'=>'zs'],['age'=>18]];
echo "学号：{$a[0][0]}，姓名：{$a[0]['name']}，年龄：{$a[1]['age']}\n";
